external help file | Module Name | online version | schema |
---|---|---|---|
AIP.dll-Help.xml |
AzureInformationProtection |
2.0.0 |
Relevant for: AIP unified labeling client only
Creates an ad-hoc protection policy for custom permissions.
New-AIPCustomPermissions -Users <String[]> -Permissions <Permissions> [-ExpirationDate <DateTime>]
[<CommonParameters>]
The New-AIPCustomPermissions cmdlet creates an ad-hoc protection policy object for custom permissions that you store as a variable and then use to protect a file or files when you run the labeling cmdlet, Set-AIPFileLabel.
If the label that is applied is configured for protection settings, the custom permissions from the ad-hoc protection policy replace the protection settings from the label.
PS C:\> $permissions = New-AIPCustomPermissions -Users user1@contoso.com -Permissions Viewer
This command creates an ad-hoc protection policy object that grants user1 from contoso.com usage rights from the Reviewer permissions and stores this policy in a variable named permissions. This ad-hoc protection policy can then be used to apply protection to a file or files.
There is no output displayed for this command.
Example 2 - Create an ad-hoc protection policy object for multiple users and that has an expiration date
PS C:\> $permissions = New-AIPCustomPermissions -Users user1@contoso.com, user2@vanarsdel.com -Permissions Reviewer -ExpirationDate (Get-Date -Month 1 -Day 1 -Year 2020)
This command creates an ad-hoc protection policy object that grants users from different organizations usage rights from the Reviewer permissions, and also applies an expiration date. The ad-hoc protection policy object is stored in a variable named permissions, which can then be used to apply this protection to a file or files.
There is no output displayed for this command.
Specifies an expiration date for the ad-hoc protection policy.
After this expiry date, the specified users will no longer be able to access the file or files. However, the owner and a super user can always access the file, even after the expiry period is reached.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a permissions level that groups usage rights that are typically used together. Use this parameter and the Users parameter to grant usage rights to specified users.
To see which individual usage rights are included in each of the permissions levels, see Rights included in permission levels.
Type: Permissions
Parameter Sets: (All)
Aliases:
Accepted values: Viewer, Reviewer, CoAuthor, CoOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies users who will have rights to use the file or files. Use this parameter and the Permission parameter to grant rights to specified users or groups.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.